home *** CD-ROM | disk | FTP | other *** search
- /* An example REXX script for Iconian */
-
- /* Pretty useless macro, really,
- all it does is draw a 11x11 box around
- the mouse cursor, adding 1 to the value
- of each pixel. Is smart enough to wrap
- the last color of the scree to color 0.*/
-
- /* PS: Expect this script to take LOTS and LOTS of time! */
-
- address 'ICONIAN.1'
- options results
-
- /* grab current mouse coords */
- 'getcoord x'
- mx=result
- 'getcoord y'
- my=result
-
- /* Lock the GUI so the user can interfere! */
- lockgui
-
- /* Ask for the screen depth */
- 'getscreendepth'
- depth=result
-
- /* Now, convert that to the number of colors */
- /* (Is there an easier way? Can rexx do a SHL? */
- IF depth=1 THEN numofcolors=2
- IF depth=2 THEN numofcolors=4
- IF depth=3 THEN numofcolors=8
- IF depth=4 THEN numofcolors=16
- IF depth=5 THEN numofcolors=32
- IF depth=6 THEN numofcolors=64
- IF depth=7 THEN numofcolors=128
- IF depth=8 THEN numofcolors=256
-
- numofcolors=numofcolors-1
-
- /* do a loop, -5 to +5 and -5 to +5 */
-
- Do t=my-5 to my+5
- Do i=mx-5 to mx+5
- getpixel i t
- pen=result
- pen=pen+1
- If pen>numofcolors Then pen=0
- setfgcolor pen
- plot i t
- END
- END
-
- /* Let go of the GUI. */
- unlockgui
-